import request from '@/utils/request'



const api = {
    //数据加载
    GetList(query) {
        return request({
            url: `/api/BaseData/QmsBaseFactorystructure`,
            method: 'GET',
            data: query
        })
    },
    //新建
    Create(dataForm) {
        return request({
            url: `/api/BaseData/QmsBaseFactorystructure`,
            method: 'post',
            data: dataForm,
        })

    },
    //删除
    Delete(id) {
        return request({
            url: `/api/BaseData/QmsBaseFactorystructure/${id}`,
            method: 'DELETE'
        })

    },
    //修改
    Update(dataForm) {
        return request({
            url: '/api/BaseData/QmsBaseFactorystructure/' + dataForm.id,
            method: 'PUT',
            data: dataForm
        })

    },

    //编辑加载
    GetInfo(dataForm) {
        return request({
            url: '/api/BaseData/QmsBaseFactorystructure/' + dataForm.id,
            method: 'get'
        })
    },
    // 获取三级菜单下拉框
    GetListOption(Type) {
        return request({
            url: `/api/BaseData/QmsBaseFactorystructure/GetListOption/${Type}`,
            method: 'GET'
        })

    },
    // 工厂建模信息下拉框
    getDictionaryTypeSelector(id) {
        return request({
            url: '/api/BaseData/QmsBaseFactorystructure/Selector/' + (!!id ? id : 0),
            method: 'GET'
        })
    }
}
export default api;

